package polep.wespace.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import polep.wespace.model.Message;
import polep.wespace.model.WeChatPublicNumber;

@Component("weChatPublicNumberDao")
public class WeChatPublicNumberDao extends BaseDao {

	public int updateAccessToken(WeChatPublicNumber message) {
		return this.readSqlSession.update("polep.wespace.dao.wechatPublicNumberDao.updateAccessToken", message);
	}
	
	public List<WeChatPublicNumber> findWecatPublicNumber(int start,int size) {
		Map<String,Integer> map = new HashMap<String,Integer>();
		map.put("start", start);
		map.put("size", size);
		return this.readSqlSession.selectList("polep.wespace.dao.wechatPublicNumberDao.selectWecatPublicNumber",map);
	}
	
}
